The present invention generally relates to a method of using computer equipment to send time-stamped frames. More particularly, the present invention relates to a method of inserting a transmit time stamp of a test frame representing a reference time signal indicating the time when the test frame is shifted onto the outgoing network wire, and inserting a received time stamp corresponding to the reference signal time when the test frame is received by a receiving computer, independent of the operating system clocks of the sending and receiving computers, to provide more accurate timing measurement services.
It is known to make use of special time-stamped frames for measuring the time required for transfer between a piece of equipment to which it is connected, e.g. by a communications network, and in particular the Internet. In known techniques, the time stamp of such a frame corresponds to the instant at which the test frame was generated. Frames generated under such conditions do not enable transmission time to be measured accurately, and in any event transmission time is defined in standards as the time between the last bit of the frame being sent and the first bit of the frame being received by the remote equipment.
In the present state of the network performance, e.g. Internet performance, this lack of accuracy is without consequence since the transmission time being measured can be as long as several hundreds of milliseconds, or even several seconds. Nevertheless, there is a very clear trend at present towards higher data rate networks and towards the creation of services in which transmission time is guaranteed, and this makes it necessary to have a higher performance measurement tool for quality control of high quality services.
The standard timescale used by most nations of the world is the Universal Coordinated Time or UTC, which is based on the Earth's rotation about its axis. The Gregorian calendar, which is commonly used to represent UTC time, is based on the Earth's rotation about the Sun. The UTC timescale is disciplined with respect to International Atomic Time (TAI) by inserting leap seconds at intervals of about 18 months.
UTC time information is disseminated and broadcasted by various means, including radio, satellite navigation systems (GPS) as well as telephone modems. GPS is the most accurate way to get several computers in sync with UTC. GPS are used to reduce offset between UTC and the system time.
For reasons of convenience, it is not possible to equip every computer with one of these GPS receivers. However, it is possible to equip some number of computers acting as timeservers to synchronize a much larger number of remote clients connected by a common network. In order to do this, a distributed network clock synchronization protocol is required which can read a server clock, transmit the reading to one or more clients and adjust each client clock as required. Protocol that does this includes the Network Time Protocol (NTP). The relation between the clients and the servers is sometimes referred as an NTP tree where the clients are the leaves, the root is a server and all the intermediate nodes are client or server.
Such protocol works on the client server model, where, on request, the server sends a message including its current clock value. Upon arrival, the client adds its own timestamp but the client needs also to measure the propagation delay from the server in order to determine its clock offset relative to the server. Since it is not possible to determine the one-way delays, unless the actual clock offset is known, the protocol measures the total round trip delay and assumes the propagation times are statistically equal in each direction. In general, this is a useful approximation, however, in the Internet of today, network paths and the associated delays can differ significantly due to the individual service providers.
Computers include a quartz resonator-stabilized oscillator and hardware counter that interrupt the processor at intervals of a few milliseconds. At each interrupt, a quantity called tick is added to a system variable representing the clock time. This clock can be read by system and application programs. Once set, the clock readings increment at a nominal rate, depending on the value of tick. Typical system kernels provide a programmable mechanism to increase or decrease the value of tick by a small, fixed amount in order to amortize a given time adjustment smoothly over multiple tick intervals. Such mechanisms are often based on an interrupt coming from a counter. A companion chip to the central processing unit (CPU) is also needed in order to initialize the system variable with the time of day value when the system is powered on. This chipset, called Real Time Clock, works in conjunction with a quartz and a battery in order to maintain and increase the time of day information up to date even when the system is not powered. This jiffy or system clock resolution is typically around 10 milliseconds.
Clock errors are due to variations in network delay and latencies in computer hardware and software (jitter), as well as clock oscillator instability (wander).
The time of a client relative to its server can be expressedT(t)=T(t0)+R(t−t0)+½D(t−T0)2,where t is the current time, T is the time offset at the last measurement update t0, R is the frequency offset and D is the drift due to resonator aging. All three terms include systematic offsets that can be corrected and random variations that cannot. NTP estimates the first two terms. Errors due to the third term, while important to model resonator aging in precision applications, are neglected, since they are usually dominated by errors in the first two terms. The synchronization protocol estimates T(t0) and R(t0) at regular intervals and adjusts the clock to minimize T(t) in future. In common cases, R can have systematic offsets of several hundred parts-per-million (PPM) with random variations of several PPM due to ambient temperature changes. If not corrected, the resulting errors can accumulate to seconds per day. In order that these errors do not exceed a nominal specification, the protocol must periodically re-estimate T and R and compensate for variations by adjusting the clock at regular intervals. As a practical matter, for nominal accuracies of tens of milliseconds, this requires clients to exchange messages with servers at intervals in the order of tens of minutes.
Analysis of quartz-resonator stabilized oscillators show that errors are a function of the averaging time, which in turn depends on the interval between corrections. At correction intervals less than a few hundred seconds, errors are dominated by jitter, while, at intervals greater than this, errors are dominated by wander. These errors accumulate at each NTP level from the root to the leaves of the tree. It is possible to quantify these errors by statistical means, so does NTP.
NTP protocol carries several approximations that can result in errors that are at a level of magnitude far above the resolution even if it has been shown that the worst-case error in reading a remote server clock cannot exceed one-half the round trip delay measured by the client. Time correction techniques, such as NTP, are based on an approximation of the one way delay by sampling the round trip delay and by assuming that the round trip delay is twice the one way delay. Although this might not be true, another hidden inaccuracy comes from the fact that the time stamp that is carried by an NTP frame for example doesn't carry the wire time stamp. When the application (NTP in this case), reads the system time and stamps the frame to be sent with this value, then this frame is queued in the driver memory space and then the driver will send this frame over the network. Between the time the time stamp is affixed to the frame and the time the frame is sent, several things might occur that adds some erratic delays. Such delays may come from other running tasks that cause a kernel memory swap. Real time kernel may avoid these erratic delays by giving to this task the highest priority.
In order to avoid NTP erratic behaviors, GPS or radio clock can be used. But as long as the measurement relies on a software time stamping algorithm that doesn't match accurately the wire time, the accuracy of the measure will be bounded by key approximations. Amongst the most critical ones are:                Non real time kernel has a behavior that creates hidden time drift due to task time slicing, context switching or cache misses.        Even with real time kernel, the frame sending process is lasting some processor cycles and more ever, on an Internet network, an ARP request/response may be sent if the physical address of the destination node is not within the ARP cache.        In either case, kernel buffering is adding delays. Once the time stamp has been added to the frame, the frame is buffered in the I/O driver transmit queue.        
All software optimization techniques aimed at improving the system time resolution, even used in conjunction with a GPS that allows a better synchronization to UTC, don't lead to an overall good accuracy. With the increased speed of today and tomorrow's network, parameters that have been ignored or approximated in the past, will become more and more critical.
Accordingly, there is a continuing need for a technique of improving the accuracy of timing measurement services that measure the time required for transfer between a piece of computer equipment and a remote piece of equipment which are connected by a communications network. The present invention fulfills this need and provides other related advantages.